<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\validate;

/**
 * 文章验证器
 */
class Investment extends AdminBase
{
    
    // 验证规则
    protected $rule =   [
        'name'          => 'require',
        'price'       => 'require',
        'user_bonus'       => 'require',
        'start_time'       => 'require',
        'king_bonus'       => 'require',
        'cycle'       => 'require',
        'end_time'       => 'require',

    ];

    // 验证提示
    protected $message  =   [
        'name.require'         => '产品名称不能为空',
        'price.require'      => '金额不能为空',
//        'ranking.require'         => '排名不能为空',
        'user_bonus.require'      => '用户分红比例不能为空',
        'king_bonus.require'      => '赌王分红比例不能为空',
        'cycle.require'      => '周期不能为空',
        'start_time.require'      => '委托时间不能为空',




    ];
    
    // 应用场景
    protected $scene = [
        'edit'  =>  ['name', 'price', 'user_bonus', 'king_bonus', 'cycle', 'start_time']
    ];
}
